﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WcfService
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IService1”。
    [ServiceContract]
    public interface IService1
    {
        #region 登录接口
        //[OperationContract]
        //string UserLogin(string Acc, string Pwd, string YZM, int RETID);
        //[OperationContract]
        //string OperUserLogin(string Acc, string Pwd, string YZM, int RETID);
        #endregion

        #region GetOrder_Shelves根据商户ID获取该商户的所有上架信息
        [OperationContract]
        string GetOrder_Shelves(int pageIndex, int pageSize, string MerID, string YZM, int RETID);
        #endregion

        #region SetOrder_Shel设置商户上架数量
        [OperationContract]
        string SetOrder_Shel(string DishesID, int HasNub, string YZM, int RETID);
        #endregion

        #region SetOrder_Shelves更新商户的所有上架信息
        [OperationContract]
        string SetOrder_Shelves(int OperID, string json, int tag, string YZM, int RETID);
        #endregion

        #region 得到当前订单所有的状态
        [OperationContract]
        string GetOrder_FormLog(int FormID, string YZM, int RETID);
        #endregion

        #region GetDishesType_table获取商户分类日报表信息
        [OperationContract]
        string GetDishesType_table(string MerID, string TimeS, string TimeE, string YZM, int RETID);
        #endregion

        #region GetDayReport_Dishes获取商户日报表信息
        [OperationContract]
        string GetDayReport_Dishes(string MerID, string Uer, string TimeS, string TimeE, string YZM, int RETID);
        #endregion

        #region updFormBY订单状态为提交
        [OperationContract]
        string updFormBY(int FormID, string Flowform, string YZM, int RETID);
        #endregion

        #region FeatchIspy查询订单是否已支付
        [OperationContract]
        string FeatchIspy(int FormID, string YZM, int RETID);
        #endregion

        #region UpdateFormIsPay用户付款成功后更新订单支付状态
        [OperationContract]
        string UpdateFormIsPay(int FormID, string YZM, int RETID);
        #endregion

        #region Order_Form_T
        #region GetOrder_Form根据商户ID获取该商户的所有订单信息
        [OperationContract]
        string GetOrder_Form(int pageIndex, int pageSize, string StarTime, string EndTime, string FormBY, string MerID, string YZM, int RETID);
        [OperationContract]
        string GetOrder_Form_User(int pageIndex, int pageSize, string OpenId, int type, string YZM, int RETID);
        [OperationContract]
        string getOrderDetailByOrderID(int FormID, string YZM, int RETID);
        #endregion

        #region SetOrder_Form修改商户的订单状态和备注信息
        [OperationContract]
        string SetOrder_Form(int OperID, int MerID, string FormID, string FormBY, string IntBZ, string YZM, int RETID);
        [OperationContract]
        string BookOrder(string Data, string PayID, string YZM, int RETID);
        [OperationContract]
        string BookOrder2(string Data, string PayID, string YZM, int RETID);
        [OperationContract]
        string singlePay(int FormID, int FormPayType, string PayID, string YZM, int RETID);
        #endregion

        #region GetOrder_FormControl查询订单状态控制表
        [OperationContract]
        string GetOrder_FormControl(string YZM, int RETID);
        #endregion
        [OperationContract]
        string GetNewOrderId(int FormID, string YZM, int RETID);
        [OperationContract]
        string GetNewOrderIdByPS(int FormID, string YZM, int RETID);
        [OperationContract]
        string GetDishesShoppingCar(string[] CarID, string YZM, int RETID);
        // 返回订单大于等于当前状态的ConID集合
        [OperationContract]
        string GetFromConID(int FormID, string Componen, int tag, string YZM, int RETID);

        [OperationContract]
        string GetFormByID(int FormID, string YZM, int RETID);

        [OperationContract]
        string CountDiscount(string[] DishIDs, int[] DistCount, string MerID, string PayID, int PricType, int IsTake, string YZM, int RETID);
        [OperationContract]
        string GetOrderTime(string MerID, string YZM, int RETID);
        [OperationContract]
        string GetOrder_OpenIDSendList(string OpenID, string FormID, string GetType, int DataIndex, int DataSize, string Sdate, string Edate, string ConID, string YZM, int RETID);
        [OperationContract]
        string ReBookOrder(int FormID, string PayID, int lx, int IsTake, string YZM, int RETID);
        [OperationContract]
        string ReBookOrder2(int FormID, string PayID, int lx, int IsTake, string YZM, int RETID);
        #endregion

        #region Order_Eva
        #region SetOrder_Eva更新所有商户的评论管理信息
        [OperationContract]
        string SetOrder_Eva(int OperID, string json, int tag, string YZM, int RETID);
        #endregion
        [OperationContract]
        string GetOrder_Eva(int pageIndex, int pageSize, string MerID, string YZM, int RETID);

        [OperationContract]
        string GetOrder_EvaByPara(int pageIndex, int pageSize, string FormID, string DishesNmae, string EvaStars, string MerID, string YZM, int RETID);

        [OperationContract]
        string AddOrderEva(string FormID, string[] FormDishesID, string EvaTxt, int EvaStars, string YZM, int RETID);
        [OperationContract]
        string GetDIshEva(string DishesID, string YZM, int RETID);
        #endregion

        #region GetOrder_MerPricing所有商户的订单优惠信息
        [OperationContract]
        string GetOrder_MerPricing(int pageIndex, int pageSize, string MerID, string YZM, int RETID);
        [OperationContract]
        string CountPs(string MerId, string StatS, string BDate, string EDate, string YZM, int RETID);
        #endregion

        #region  找一个订单里有多少个优惠
        [OperationContract]
        string GetDiscounts(string MerID, string PayID, int PricType, string YZM, int RETID);
        #endregion

        #region 计算用户选择的优惠
        [OperationContract]
        string CalcDiscount(string[] DishIDs, int[] DistCount, string MerID, string PricID, int IsTake, string YZM, int RETID);
        #endregion

        #region GetOrder_Int查询商户积分管理信息
        [OperationContract]
        string GetOrder_Int(string MerID, string YZM, int RETID);
        #endregion

        #region GetOrder_Int查询商户积分管理信息
        [OperationContract]
        string GetOrder_MerInt(int OperID, string YZM, int RETID);
        #endregion

        #region GetOrder_UserInt_T查询用户积分信息
        [OperationContract]
        string GetOrder_UserInt_T(int pageIndex, int pageSize, int AccID, string YZM, int RETID);
        #endregion

        #region SetOrder_Int更新商户积分管理信息
        [OperationContract]
        string SetOrder_Int(int OperID, string json, int tag, string YZM, int RETID);
        #endregion

        #region GetOrder_UserInt查询用户积分信息
        [OperationContract]
        string GetOrder_UserInt(int pageIndex, int pageSize, string MerID, Dictionary<string, string> Dic, string YZM, int RETID);
        #endregion

        #region SetOrder_UserInt更新用户积分信息
        [OperationContract]
        string SetOrder_UserInt(int OperID, int UserIntID, string Tag, string OrderID, int updateInt, string BZ, string YZM, int RETID);
        #endregion

        #region Order_UserWalt查询用户钱包信息
        #region SetOrder_UserWalt更新用户钱包信息
        [OperationContract]
        string SetOrder_UserWalt(int OperID, int UserWaltID, int Tag, string OrderID, int updateMoney, string BZ, string YZM, int RETID);
        #endregion
        [OperationContract]
        string GetOrder_UserWalt(int pageIndex, int pageSize, string AccName, string AccCall, string AccIdentifier, string AccCerNub, string YZM, int RETID);
        [OperationContract]
        string GetUserWalt(int AccID, string YZM, int RETID);
        #endregion

        #region GetOrder_FlowInt查询积分流水信息
        [OperationContract]
        string GetOrder_FlowInt(int pageIndex, int pageSize, string MerID, string YZM, int RETID);
        #endregion

        #region Order_Mer
        [OperationContract]
        string GetShelvesInfo(string MerID, string YZM, int RETID);
        [OperationContract]
        string GetOrder_Mer(string YZM, int RETID);
        [OperationContract]
        string GetShopList(int pageIndex, int pageSize, string KeyWord, string FenLei, int PaiXu, int DelMaxMon, int DelFormMon, string YZM, int RETID);
        [OperationContract]
        string GetShopInfo(string MerID, string YZM, int RETID);
        [OperationContract]
        string GetOrder_MerByOperId(int OperID, string YZM, int RETID);
        #region SetOrder_Mer更新商户信息信息
        [OperationContract]
        string SetOrder_Mer(int OperID, string json, int tag, string YZM, int RETID);
        #endregion
        [OperationContract]
        string SetMerPhoto(string MerID, string PhotoAdd, string YZM, int RETID);
        [OperationContract]
        byte[] GetMerPhoto(string MerID, string YZM, int RETID);
        [OperationContract]
        string UpdateMerPhoto(string MerID, byte[] Pic, string YZM, int RETID);
        #endregion

        #region GetOrder_MerAccount查询商户账目
        [OperationContract]
        string GetOrder_MerAccount(int pageIndex, int pageSize, string MerID, string MerAccType, string MerAccDate, string YZM, int RETID);
        #endregion

        #region GetOrder_FlowMon查询金额流水
        [OperationContract]
        string GetOrder_FlowMon(int pageIndex, int pageSize, string AccNum, string WaltID, string WaltFlowType, string StarTime, string EndTime, string YZM, int RETID);
        #endregion

        #region GetOrder_ FlowPay查询第三方支付流水
        [OperationContract]
        string GetOrder_FlowPay(int pageIndex, int pageSize, string YZM, int RETID);
        #endregion

        //模糊查询第三方支付流水
        [OperationContract]
        string GetOrder_FlowPayByPara(int pageIndex, int pageSize, string AccName, string AccCall, string AccNum, string PayFlowType, string PayID, string PayFlowTime, string EFlowTime, string YZM, int RETID);

        #region GetOrder_Key查询系统参数设置查询接口
        [OperationContract]
        string GetOrder_Key(string YZM, int RETID);
        #endregion

        #region SetOrder_Key更新系统参数设置接口（只有修改功能）
        [OperationContract]
        string SetOrder_Key(int OperID, string json, int tag, string YZM, int RETID);
        #endregion

        #region GetOrder_Pay查询第三方支付管理接口
        [OperationContract]
        string GetOrder_Pay(string YZM, int RETID);
        #endregion

        #region SetOrder_Pay_Key更新第三方支付管理接口
        [OperationContract]
        string SetOrder_Pay_Key(int OperID, string json, int tag, string YZM, int RETID);
        #endregion

        #region GetOrder_Walt查询钱包信息
        [OperationContract]
        string GetOrder_Walt(string YZM, int RETID);
        [OperationContract]
        string GetUserPayWalt(int AccID, string MerID, string YZM, int RETID);
        #endregion

        #region SetOrder_Walt更新钱包信息（删除时当有用户使用钱包，该钱包不允许删除）
        [OperationContract]
        string SetOrder_Walt(int OperID, string json, int tag, string YZM, int RETID);
        #endregion

        #region GetOrder_OperationFlow查询系统操作流水表信息
        [OperationContract]
        string GetOrder_OperationFlow(int pageIndex, int pageSize, string Time_Start, string Time_End, string LogType, string Operat_Result, string YZM, int RETID);
        #endregion

        #region GetMer根据操作员权限获取对应商户权限
        [OperationContract]
        string GetMer(int OperID, string YZM, int RETID);
        #endregion

        #region SetMerOperID设置操作员的商户权限
        [OperationContract]
        string SetMerOperID(int OperID, string json, string YZM, int RETID);
        #endregion

        #region Order_Dishes
        [OperationContract]
        string SetOrder_Dishes(int OperID, string json, int tag, string YZM, int RETID);
        #region GetOrder_Dishes根据商户获取该商户所有的商品信息
        [OperationContract]
        string GetOrder_Dishes(string MerID, string YZM, int RETID);
        #endregion
        [OperationContract]
        string SetDishPhoto(string DishesID, string PhotoAdd, string YZM, int RETID);

        [OperationContract]
        byte[] GetPhoto(string DishesID, int Lx, string YZM, int RETID);

        [OperationContract]
        string UpdatePhoto(string DishesID, byte[] Pic, byte[] PicSmall, string YZM, int RETID);

        [OperationContract]
        string UpdateDishesPhoto(string DishesID, string DishesURL, string DishesDaURL, string DishesXiaoURL, string YZM, int RETID);

        [OperationContract]
        string Get_Order_Dishes(string YZM, int RETID);

        [OperationContract]
        string GetOrder_DishesByDY(string DishesTypeID, string YZM, int RETID);

        [OperationContract]
        string UpdateOrder_Dishes_Up(int OperID, string json, int RETID);

        [OperationContract]
        string UpdateOrder_Dishes_Down(int OperID, string json, int RETID);

        [OperationContract]
        string UpdateOrder_Dishes_Del(int OperID, string json, int RETID);

        [OperationContract]
        string Get_Order_DishesList(string DishesTypeID, string YZM, int RETID);

        [OperationContract]
        string Get_Order_DishesByDishesID(string DishesID, string YZM, int RETID);

        [OperationContract]
        string GetDishesList(string DishesNmae, int PaiXu, string DishesTypeID1, string DishesTypeID2, string YZM, int RETID);

        [OperationContract]
        string GetDishesGoods(string YZM, int RETID);
        #endregion

        #region GetOrder_DishesType获取商品分类信息
        [OperationContract]
        string GetOrder_DishesType(string MerID, string YZM, int RETID);
        #endregion

        #region SetOrder_DishesType更新商品分类信息（删除商品分类时要注意把对应商品的商品分类绑定去掉）
        [OperationContract]
        string SetOrder_DishesType(int OperID, string json, int tag, string YZM, int RETID);

        [OperationContract]
        string SetOrder_DishesType2(int OperID, string json, int tag, string PantID, string YZM, int RETID);
        #endregion

        #region SetOrder_MerPricing设置商户的对应订单优惠信息
        [OperationContract]
        string SetOrder_MerPricing(int OperID, string json, int tag, string YZM, int RETID);
        #endregion

        #region GetOrder_PayType根据支付模式查询对应的支付信息
        [OperationContract]
        string GetOrder_PayType(int PricType, string YZM, int RETID);
        #endregion

        #region Order_MerSetWxMess_T
        [OperationContract]
        string GetMerWxID(string MerID, string YZM, int RETID);
        [OperationContract]
        string UpdateMerWxID(string json, int tag, string YZM, int RETID);
        [OperationContract]
        string Set_MerWxID(string json, int tag, string YZM, int RETID);
        #endregion

        #region  管理派送员信息接口
        [OperationContract]
        string SetOrder_Taker(string json, int tag, string YZM, int RETID);
        #endregion

        #region 根据调度员获取旗下派送员信息
        [OperationContract]
        string GetOrder_Taker(string OperID, int tag, int pageIndex, int pageSize, string YZM, int RETID);
        #endregion

        #region 根据登陆的操作员获取所属的调度单
        [OperationContract]
        string GetOrder_SendByOperId(int OperID, string ConID, string StartTime, string EndTime, string FormID, int pageIndex, int pageSize, string YZM, int RETID);
        #endregion

        #region 变更订单状态及留言（派送员模式）
        [OperationContract]
        string UpForm_OpenIDSend(string OpenID, string FormID, string ConID, string WillTime, string LY, string YZM, int RETID);
        #endregion

        #region 修改订单派送人员
        [OperationContract]
        string SetFormToTaker(string json, int tag, string YZM, int RETID);
        #endregion

        #region 统计列表
        [OperationContract]
        string GetOrder_SendList(string OperID, string openID, int pageIndex, int pageSize, string StarTime, string EndTime, int ConID, string YZM, int RETID);
        #endregion

        #region  属于派送员（正在派送和未接单）的单子
        [OperationContract]
        string GetOrder_SendTaker(string TakerOpenID, int pageIndex, int pageSize, string YZM, int RETID);
        #endregion

        #region 查询派送员的归属的所有调度员
        [OperationContract]
        string GetTakerOfOper(string OpenID, string YZM, int RETID);
        #endregion

        #region  当前派送单状态的下一个派送单状态
        [OperationContract]
        string GetNextCon(string FormID, string ConID, string YZM, int RETID);
        #endregion

        #region 获取订单控制
        [OperationContract]
        string GetCon(string YZM, int RETID);
        #endregion

        #region 查询派送单
        [OperationContract]
        string SearchSend(int OperID, string YZM, int RETID);
        #endregion

        #region 根据该商户id下所有派送员派送的订单
        [OperationContract]
        string GetGrid_Wiew_Send(int pageIndex, int pageSize, string Merid, string TakerName, string FormID, string Stime, string Etime, string YZM, int RETID);
        #endregion

        #region 根据该商户id下对应派送员派送的订单
        [OperationContract]
        string GetGrid_Wiew(string FormID, string YZM, int RETID);
        #endregion

        #region 企业帐号接口
        #region Order_FlowOrganization_T
        [OperationContract]
        string GetOrgFlowListFromMer(int pageIndex, int pageSize, string MerID, string StarTime, string EndTime, int Flat, string YZM, int RETID);
        [OperationContract]
        string GetOrgFlowListFromOrg(int pageIndex, int pageSize, int OrgID, string StarTime, string EndTime, int Flat, string YZM, int RETID);
        [OperationContract]
        string GetOrgFlowListFrom(int pageIndex, int pageSize, string MerID, int OrgID, string StarTime, string EndTime, int Flat, string YZM, int RETID);
        #endregion
        #region Order_Organization_T
        [OperationContract]
        string OrgLogin(string OrgName, string Pwd, string YZM, int RETID);
        [OperationContract]
        string GetOrgListFromMer(int pageIndex, int pageSize, string MerID, Dictionary<string, string> Dic, string YZM, int RETID);
        [OperationContract]
        string SetOrganization(int OperID, string Data, int tag, string YZM, int RETID);
        [OperationContract]
        string GetOrgListForm(int pageIndex, int pageSize, Dictionary<string, string> Dic, string YZM, int RETID);
        [OperationContract]
        string SetOrganizationLimit(int OperID, int OrgID, int LOrgWaltLimit, string YZM, int RETID);
        #endregion
        #region Order_OrganizationCheckOut_T
        [OperationContract]
        string CountCheckOut(int pageIndex, int pageSize, string MerID, int OrgID, string Time, string YZM, int RETID);
        [OperationContract]
        string CheckOut(string MerID, int OrgID, string Time, string Paid, int OperID, string YZM, int RETID);
        #endregion
        #region Order_OrganizationForm 企业订单
        [OperationContract]
        string OrgBookOrder(string Data, string YZM, int RETID);
        [OperationContract]
        string GetOrderFormOrgID(int pageIndex, int pageSize, int OrgID, string YZM, int RETID);
        [OperationContract]
        string GetOrderFormMerID(int pageIndex, int pageSize, string MerID, string YZM, int RETID);
        [OperationContract]
        string OrgCountDiscount(string[] DishIDs, int[] DistCount, string MerID, string YZM, int RETID);
        #endregion

        #region Order_OrganinztionCheckOutFlow_T
        [OperationContract]
        string FlatOrgFlow(string Data, int OperID, string YZM, int RETID);
        #endregion
        #endregion


        #region Order_MerSendAdd_T
        [OperationContract]
        string GetAllMerSendAdd(int pageIndex, int pageSize, string YZM, int RETID);
        [OperationContract]
        string SetOrder_MerSendAdd(string json, int tag, string YZM, int RETID);
        [OperationContract]
        string GetMerAddFromId(int pageIndex, int pageSize, int AddId, string YZM, int RETID);
        #endregion

        #region Order_MerSend_T
        [OperationContract]
        string GetSendAddFromMerId(int pageIndex, int pageSize, string MerId, string YZM, int RETID);
        [OperationContract]
        string UpdateMerSendAdd(string MerId, string AddIds, string YZM, int RETID);
        [OperationContract]
        string GetUserContactByMerid(string MerId, int AccID, string YZM, int RETID);
        #endregion

        #region 获取热门商品
        [OperationContract]
        string Get_Dishes_sort(string YZM, int RETID);
        #endregion
        #region 获取热门商品
        [OperationContract]
        string SalesCount(string YZM, int RETID);
        #endregion

        [OperationContract]
        string get_count(string YZM, int RETID);

        [OperationContract]
        string DCUserLogin_WeiXin(string AccMobile, string YZM, int RETID);

        #region Order_UserSendAddr
        [OperationContract]
        string GetUserSendAddr(string OpenId, string MerId, string YZM, int RETID);

        [OperationContract]
        string GetAllUserSendAddr(string OpenId, int AccID, string YZM, int RETID);

        [OperationContract]
        string SetUserSendAddr(string json, int tag, string YZM, int RETID);

        #endregion
        [OperationContract]
        string GetAllAddByUser(string YZM, int RETID);

        [OperationContract]
        string Get_DishesType(string YZM, int RETID);

        [OperationContract]
        string Get_Order_DishesType();

        [OperationContract]
        string Get_Order_DishesType_PC(string YZM, int RETID);

        [OperationContract]
        string Get_Order_DishesType_PC_T(string DishesTypeID, string YZM, int RETID);

        [OperationContract]
        string Get_Order_DishesTypeByPantID(string PantID, string YZM, int RETID);

        [OperationContract]
        string Get_Order_DishesTypeByDishesTypeID(string DishesTypeID, string YZM, int RETID);

        [OperationContract]
        string UpdateDishesTypePhoto(string DishesTypeID, string DishesTypeURL, string YZM, int RETID);

        [OperationContract]
        bool Get_Order_DishesTypeByName(string dishestypename);

        [OperationContract]
        bool Get_Order_DishesTypeByName2(string dishestypename);

        [OperationContract]
        string UpdateDishesTypePostion(string dishestypeidup, string dishestypeiddown, int postionup, int postiondown);

        [OperationContract]
        string UpdateDishesTypeSort(int OperID, string DishesTypeID, int Postion, int RETID);

        [OperationContract]
        string Carousel_UploadPic(int OperID, string json, string YZM, int RETID);

        [OperationContract]
        string GetOrder_DishesCarousel_Photo(string DishesID, string YZM, int RETID);

        [OperationContract]
        string DishesCarousel_Photo_Del(int OperID, string json, int RETID);

        [OperationContract]
        string GetOrder_DishesCarousel(string YZM, int RETID);

        [OperationContract]
        string ParameterOverview_UploadPic(int OperID, string json, string YZM, int RETID);

        [OperationContract]
        string GetOrder_DishesParameterOverview_Photo(string DishesID, string YZM, int RETID);

        [OperationContract]
        string DishesParameterOverview_Photo_Del(int OperID, string ParameterOverviewID, int RETID);

        [OperationContract]
        string Order_ShoppingCar_Add(int OperID, string DisheID, string YZM, int RETID);

        [OperationContract]
        string Order_ShoppingCar_Update(string CarID, int Num, string YZM, int RETID);

        [OperationContract]
        string Order_ShoppingCar_Del(string CarID, string YZM, int RETID);

        [OperationContract]
        string Get_Order_Dishes_ShoppingCar(int OperID, string YZM, int RETID);

        [OperationContract]
        string Get_Order_Information(string YZM, int RETID);

        [OperationContract]
        string SetOrder_information(int OperID, string json, int tag, string YZM, int RETID);

        [OperationContract]
        string Get_Order_InformationByType(string Type, string YZM, int RETID);

        [OperationContract]
        string Details_Order_Information(string InformationID, string YZM, int RETID);

        [OperationContract]
        string Get_User_Districts();

        [OperationContract]
        string SetUser_District(int OperID, string json, int tag, string YZM, int RETID);

        [OperationContract]
        string Get_User_DistrictsByDistrictID(string DistrictID, string YZM, int RETID);

        [OperationContract]
        string Get_User_DistrictsTwoByDistrictID(string DistrictID);

        [OperationContract]
        string Get_User_DistrictsThreeByDistrictID(string DistrictID);
    }
}
